package com.siyu.tickets.entity;

import com.siyu.tickets.entity.base.BaseElement;

public class Element extends BaseElement {

	private static final long serialVersionUID = 3952231200246607983L;

	public static final String ELE_TYPE_CITY = "city";
	public static final String ELE_TYPE_TYPE = "type";
	public static final String ELE_TYPE_GROUP = "group";
	public static final String ELE_TYPE_EXPRESS = "express";
	public static final String ELE_TYPE_DELIVERY = "delivery";

	private static final String[] ELE_TYPES = new String[] { ELE_TYPE_CITY, ELE_TYPE_TYPE, ELE_TYPE_GROUP,
			ELE_TYPE_EXPRESS };

	public static boolean checkTypeValid(String type) {
		for (String typeName : ELE_TYPES) {
			if (typeName.equals(type)) {
				return true;
			}
		}
		return false;
	}
}
